package com.my.mymafengwo.views;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * ***********************************************
 * author:ljz
 * time:2015/12/9 10:34
 * name:自定义的不能滚动的ListView
 * step:
 * ***********************************************
 */
public class NoScrollListview extends ListView {
    private Context context;
    public NoScrollListview(Context context) {
        this(context, null);
    }

    public NoScrollListview(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public NoScrollListview(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context=context;
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
